<template>
  <div>
     <h1>孙子辈组件</h1>
     <h1>{{car}}</h1>
  </div>
</template>
<script setup>
  import {inject} from 'vue'
import { useRouter } from 'vue-router';
  // inject("key")  根据key获取祖先组件provide传递过来的值
  let car=inject("car");

  
 
</script>